package com.jungle.system.application.repository;


import com.jungle.system.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface UserLoginRepository extends JpaRepository<User, String>, JpaSpecificationExecutor<User> {


    User findByPhoneNumber(String phoneNumber);

    User findByOpenid(String openid);

    @Query("select count(*) as count from User where openid is not null ")
    Long countByWx();

}
